﻿@model IEnumerable<MVC_Store.Models.ViewModels.Cart.CartVM>

@{
    int count = 1;
}

<form class="paypalform" action="https://www.sandbox.paypal.com/us/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_cart">
    <input type="hidden" name="upload" value="1" />
    <input type="hidden" name="business" value="sb-rjgdb30115@business.example.com">

    @foreach (var item in Model)
    {
        <input type="hidden" name="item_name_@count" value="@item.ProductName">
        <input type="hidden" name="amount_@count" value="@item.Price">
        <input type="hidden" name="quantity_@count" value="@item.Quantity">
        count++;
    }

    <input type="hidden" name="currency_code" value="EUR">
    
    <div style="display: none">
        <input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but01.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
    </div>
</form>